package xcmg.syn.web.mmpart;

import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xcmg.syn.infra.BasicController;
import xcmg.syn.service.mmpart.GpsPartService;
import xcmg.syn.service.vo.mmpart.GpsPartVO;
import yb.ecp.fast.infra.annotation.FastMappingInfo;
import yb.ecp.fast.infra.infra.ActionResult;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/mmpart")
public class GpsPartController extends BasicController {
    @Resource
    private GpsPartService gpsPartService;

    @PostMapping(value = "/list")
    @ApiOperation("获取广乘GPS零件主档列表")
    @FastMappingInfo(needLogin = true)
    public ActionResult<List<GpsPartVO>> listPart(@RequestBody GpsPartVO condition) {
        List<GpsPartVO> list = gpsPartService.list(condition);
        return actionResult(list);
    }
}
